<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<style type="text/css">
body.huayang .message {
    position: fixed;
    display: none;
    z-index: 2000;
    top: 30px;
   
}
.d-none{
display:block !important;
border:none;
padding:0px;
}
.btn-secondary{
margin-bottom:0.7rem;
}
</style>
<!--推送消息-->
        	<div class="meeting-button d-none">
        		<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong">
                                     会议公示<div class="nav-counter" id="tishi">4</div> 
                </button>
        	</div>
        	<div class="message" id="exampleModalLong">
        	<div class="modal-footer d-none">
             <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
            </div>
        	<div class="">
 <c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
						<div class="top-news">
        			
		        		<div class="title pl-3">
		        			<img src="<%=request.getContextPath()%>/resources/img/news-back.png" class="pr-2"/>
		        			<a href="${ctx }/remind/getRemindsAll?deptid=${deptid}&&rolename=${role.rolename}">超时消息       	</a>
		        		</div>
        					
        		<div class="news-content px-3">
        		 <c:forEach var="res" items="${resr }">
        		 	<p class="clearfix ">
        			    <a class="unread" href="${ctx }/remind/getRemWayById?wid=${res.wid}&&deptid=${deptid}&&rolename=${role.rolename}">
        			    	<span id="rco">${res.rcontent }</span><span class="float-right"><fmt:formatDate value='${accident.actime }'   pattern="yyyy-MM-dd"/></span>
        			        <input class="start" type="hidden" value="${res.rreportstart }">
        			    
        			    </a>
        			</p>
        		</c:forEach>
        		</div>
        	</div>
        	<div class="second-news">
        		
	        		<div class="title pl-3">
	        			<img src="<%=request.getContextPath()%>/resources/img/news-back.png" class="pr-2"/>
	        			<a href="${ctx }/publicity/getMeetAll?deptid=${deptid}&&rolename=${role.rolename}">会议公示    	</a>		
	        		</div>
        		
        		<div class="news-content px-3">
        		 <c:forEach var="meet" items="${meets }">
        		 	<p class="clearfix ">
        		 		<a class="unread" href="${ctx }/publicity/getMeetByid?meid=${meet.pid }&&deptid=${deptid}&&rolename=${role.rolename}" >
        		 			<input class="startM" type="hidden" value="${meet.preportstart }">
        					<span class="d-block">提醒内容：${meet.pcontent }</span>
        				</a>
        			</p>
        		</c:forEach>
        		</div>
        	</div>
        	</div>
        </div>
	<script type="text/javascript">
			  $(document).ready(function() {
			      $("#tablist li").each(function(index) {
			          $(this).click(function() {
			              $(".contentin").removeClass("contentin");
			              $(".tabin").removeClass("tabin");
			              $(".contet-box>div").eq(index).addClass("contentin");
			              $(this).addClass("tabin");
			          });
			      })
			  })
		</script>
		<script type="text/javascript">
			/* $(function(){
			    var dv_num = 0; 
                $(".news-content .unread").each(function(){
                    dv_num +=1;  
                })
                document.getElementById("tishi").innerHTML=dv_num; 

                   
                }) 
                
                $(".top-news clearfix").hide();//隐藏
                */
               	
                  
        
               $(".top-news .news-content a").each(function(index) {
			          var num =$(this).children(".top-news .start").val();
			          if(num == 0){
			          $(this).removeClass("unread");
			          }
			          
			      })
			      
			  $(".second-news .news-content a").each(function(index) {
			          var num =$(this).children(".second-news .startM").val();
			          if(num == 0){
			         	 $(this).removeClass("unread");
			          }
			          if(num == "" || num==undefined){
			          	$(".second-news .news-content p").hide();//隐藏
			          }
			      })
			      
               
			
             $(function(){
                var dv_num = 0; 
                $(".news-content .unread").each(function(){
                    dv_num +=1;  
                })    
                document.getElementById("tishi").innerHTML=dv_num; 
        
                
               }) 
            
        </script>
        <script type="text/javascript"> 
		   window.onload=function(){ 
				var action ='<%=request.getAttribute("result")%>';
				if(action.length!==4)
				{
						alert(action);
				}
			} 
		</script>